< previous page page_494 next page >

Page 494
0494-01.jpg
Figure 12.23.
Running the Header/Subform example.
As you browse through the Publishers table, you'll see the data grid is updated, too. You can add records to the data grid or to the Publisher master. If this were a production project, you would add event-trapping features like the ones mentioned in the previous section in order to maintain data integrity. You can also add the dbFind button to the header section of the form.
Summary
Today, you learned how to load and use three of the new data-bound controls that are shipped with Visual Basic 5.
· The data-bound list box
· The data-bound combo box
· The data-bound grid
You learned how to link these new controls to Recordsets using the Visual Basic 5 data controls and how to use these links to update related tables.
You also learned several of the important Visual Basic 5 events associated with the data grid. These events let you create user-friendly data entry routines using just a data control and the data grid.
You also built a new dbFind custom control that uses the DBList control to build a data-bound list of all records in a table. This new control can be used to provide primary key (or some other unique value) selection dialogs to all your Visual Basic data entry forms.
Finally, you drew upon your knowledge of data grids, SQL, and form layout to design and implement a data entry Subform. This form showed a master table at the top and a related list table at the bottom of the form in a data-bound grid.

 
< previous page page_494 next page >

If you like this book, buy it!